Ext.define('Pearlsen.ux.QuickSearch', {
    extend: 'Ext.form.field.Trigger',
    alias: 'widget.quicksearch',
    triggerCls :Ext.baseCSSPrefix + 'form-search-trigger',
    emptyText:'输入查询内容',
    handler:null,
    fields:[],
    
    constructor: function(config) {
    	this.handler =config.handler || null;
    	this.callParent([config]);
    },
    onTriggerClick:function(){
		if (this.scope) {
			scope = this.scope;
		}else {
			scope = this;
		}
    	var value = this.getRawValue();
    	if(typeof this.handler =='function'){
    		this.handler.call(scope,value);
    	}
    }
});